package com.example.fitnessservice.module.dao.classmapper;

import com.example.fitnessservice.module.pojo.CourseDetails;
import com.example.fitnessservice.module.pojo.CourseDetailsCamp;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Author:XuRui
 * @Date:2022/11/22 12:24
 */
@Mapper
public interface ClassMapper {

    /**
     * 根据教练的id查询课程
     * @param coachId
     * @return
     */
    @Select("select * from course_details where course_coach_id = #{coachId}")
    public List<CourseDetails> findCourseByCoachId(Integer coachId);

    @Select("select * from course_details_camp where course_coach_id = #{coachId}")
    public List<CourseDetailsCamp> findCampByCoachId(Integer coachId);

}
